from django.test import TestCase
from bs4 import BeautifulSoup
# Create your tests here.
if __name__ == "__main__":
    s = "<h1>hello</h1><span>,123</span><script>alert(123)</script>"
    soup = BeautifulSoup(s, "html.parser")
    for tag in soup.find_all():
        if tag.name == "script":
            tag.decompose()
    print(soup.text)
